/*!
\copyright  Copyright (c) 2021-2023 Qualcomm Technologies International, Ltd.
            All Rights Reserved.
            Qualcomm Technologies International, Ltd. Confidential and Proprietary.

\version    
\file       
\brief      Contains stub implementations for Trap interface function not yet supported.

            Traps in this file have been entirely generated from the platform interface
            files.

            Modified traps can be found in trap_stubs.c.
*/

#if !defined(__KALIMBA__) || defined(HOSTED_TEST_ENVIRONMENT)
/* make, as opposed to SCons, compiles in all cases 
   Not needed for Kalimba */

#include <trap_stubs.h>

/* **** MICBIAS  */

/* **** USB  */
/* FULLY IMPLEMENTED */

/* **** STREAM  */
/* FULLY IMPLEMENTED */


/* **** AUDIO_MCLK  */
bool AudioMasterClockConfigure(bool use_external, uint32 frequency)
{
    UNUSED(use_external);
    UNUSED(frequency);
    return FALSE;
}
bool SourceMasterClockEnable(Source source, vm_mclk_enable enable)
{
    UNUSED(source);
    UNUSED(enable);
    return FALSE;
}
bool SinkMasterClockEnable(Sink sink, vm_mclk_enable enable)
{
    UNUSED(sink);
    UNUSED(enable);
    return FALSE;
}

/* **** CHARGER  */
/* FULLY IMPLEMENTED */

/* **** VSDM  */
/* FULLY IMPLEMENTED */

/* **** LE_AUDIO  */
/* FULLY IMPLEMENTED */


/* **** CSB  */
/* FULLY IMPLEMENTED */

/* **** INFRARED  */
#if TRAPSET_INFRARED
Task MessageInfraredTask(Task task)
{
    UNUSED(task);
    return (Task)NULL;
}


bool InfraredConfigure(infrared_config_key key, uint32 value)
{
    UNUSED(key);
    UNUSED(value);
    return FALSE;
}
#endif

/* **** CHARGER2  */
/* Not Needed */



/* **** ATT  */
/* FULLY IMPLEMENTED */


/* **** REFORMATSQIF  */
#if TRAPSET_REFORMATSQIF 
Sink StreamReformatSerialFlashSink(partition_filesystem_devices device)
{
    UNUSED(device);
    return (Sink)NULL;
}
#endif


/* **** SHUNT  */
/* FULLY IMPLEMENTED */

/* **** HIDDONGLE  */
/* FULLY IMPLEMENTED */

/* **** FONT  */
#if TRAPSET_FONT
FontId FontInit(void )
{
    return (FontId)0;
}


size_t FontGetGlyph(FontId font, ucs2char c, uint16 * glyph, size_t max_glyph_wid)
{
    UNUSED(font);
    UNUSED(c);
    UNUSED(glyph);
    UNUSED(max_glyph_wid);
    return (size_t)0;
}
#endif

/* **** IICSTREAM  */
/* FULLY IMPLEMENTED */


/* **** RFCOMM  */
/* FULLY IMPLEMENTED */


/* **** NATIVE  */
#if TRAPSET_NATIVE
void NativePauseForDebug(void )
{
}
#endif

/* **** SPIFLASH  */
/* FULLY IMPLEMENTED */

/* **** CHARGERCOMMS  */
/* FULLY IMPLEMENTED */

/* **** AUDIO_ANC  */
#ifdef TRAPSET_AUDIO_ANC
bool AudioAncStreamEnable(uint16 anc_enable_0, uint16 anc_enable_1)
{
    UNUSED(anc_enable_0);
    UNUSED(anc_enable_1);
    return FALSE;
}

bool AudioAncFilterLpfSet(audio_anc_instance anc_instance, audio_anc_path_id path_id, uint16 shift1, uint16 shift2)
{
    UNUSED(anc_instance);
    UNUSED(path_id);
    UNUSED(shift1);
    UNUSED(shift2);
    return FALSE;
}

bool AudioAncFilterIirSet(audio_anc_instance anc_instance, audio_anc_path_id path_id, uint16 num_coeffs, const uint16 * coeffs)
{
    UNUSED(anc_instance);
    UNUSED(path_id);
    UNUSED(num_coeffs);
    UNUSED(coeffs);
    return FALSE;
}
#endif

/* **** IIR  */
/* FULLY IMPLEMENTED */

/* **** UART  */
/* FULLY IMPLEMENTED */

/* **** FASTPIPE  */
/* FULLY IMPLEMENTED */


/* **** LCD  */
#if TRAPSET_LCD
bool LcdConfigure(uint16 key, uint16 value)
{
    UNUSED(key);
    UNUSED(value);
    return FALSE;
}


uint32 LcdSet(uint32 mask, uint32 value)
{
    UNUSED(mask);
    UNUSED(value);
    return (uint32)0;
}
#endif

/* **** DEBUG_PARTITION  */
/* FULLY IMPLEMENTED */
/* **** SD_MMC  */
#if TRAPSET_SD_MMC
Source StreamSdMmcSource(uint8 slot, uint32 start_block, uint32 blocks_count)
{
    UNUSED(slot);
    UNUSED(start_block);
    UNUSED(blocks_count);
    return (Source)NULL;
}


Sink StreamSdMmcSink(uint8 slot, uint32 start_block, uint32 blocks_count)
{
    UNUSED(slot);
    UNUSED(start_block);
    UNUSED(blocks_count);
    return (Sink)NULL;
}


bool SdMmcSlotInit(bool init)
{
    UNUSED(init);
    return FALSE;
}


bool SdMmcReadData(uint8 slot, uint8 * buff, uint32 start_block, uint32 blocks_count)
{
    UNUSED(slot);
    UNUSED(buff);
    UNUSED(start_block);
    UNUSED(blocks_count);
    return FALSE;
}


bool SdMmcDeviceInfo(uint8 slot, sd_mmc_dev_info * device_info)
{
    UNUSED(slot);
    UNUSED(device_info);
    return FALSE;
}
#endif

/* **** HOSTSTREAM  */
/* FULLY IMPLEMENTED */

/* **** IIC  */
/* FULLY IMPLEMENTED */

/* **** SRAM  */
#if TRAPSET_SRAM
uint16 * SramMap(uint32 sram_addr, uint16 size)
{
    UNUSED(sram_addr);
    UNUSED(size);
    return (uint16 *)0;
}
#endif

/* **** OSAL  */
/* FULLY IMPLEMENTED */

/* **** FLASH_OPS  */
/* FULLY IMPLEMENTED */

/* **** LE_AE  */
/* FULLY IMPLEMENTED */


/* **** CAPACITIVE_SENSOR  */
#if TRAPSET_CAPACITIVE_SENSOR
bool CapacitiveSensorPadQuery(uint16 count, const uint16* pads, capacitive_sensor_pad_state * results)
{
    UNUSED(count);
    UNUSED(pads);
    UNUSED(results);
    return FALSE;
}


Task MessageCapacitiveSensorTask(Task task)
{
    UNUSED(task);
    return (Task)NULL;
}


bool CapacitiveSensorConfigureMultiPad(uint16 count, const uint16 * pads, const CAPACITIVE_SENSOR_PAD_CONFIG * common_config)
{
    UNUSED(count);
    UNUSED(pads);
    UNUSED(common_config);
    return FALSE;
}


bool CapacitiveSensorEnablePads(uint16 count, const uint16 * pads, const CAPACITIVE_SENSOR_PAD_LEVELS * pad_levels)
{
    UNUSED(count);
    UNUSED(pads);
    UNUSED(pad_levels);
    return FALSE;
}


bool CapacitiveSensorConfigureTouchOffset(uint16 pad, uint32 touch_offset)
{
    UNUSED(pad);
    UNUSED(touch_offset);
    return FALSE;
}


void CapacitiveSensorShieldEnable(bool enable)
{
    UNUSED(enable);
}
#endif

/* **** STATUS  */
#if TRAPSET_STATUS
Task MessageStatusTask(Task task, uint16 count, const status_field * fields)
{
    UNUSED(task);
    UNUSED(count);
    UNUSED(fields);
    return (Task)NULL;
}


void StatusQuery(uint16 count, const status_field * fields, uint16 * results)
{
    UNUSED(count);
    UNUSED(fields);
    UNUSED(results);
}
#endif

/* **** CORE  */
/* FULLY IMPLEMENTED */

/* **** TEST2  */
/* FULLY IMPLEMENTED */


/* **** NFC  */
/* FULLY IMPLEMENTED */

/* **** BLUESTACK  */
/* FULLY IMPLEMENTED */


/* **** ENERGY  */
#if TRAPSET_ENERGY
bool EnergyEstimationSetBounds(Sink sco, uint16 lower, uint16 upper)
{
    UNUSED(sco);
    UNUSED(lower);
    UNUSED(upper);
    return FALSE;
}


bool EnergyEstimationOff(Sink sco)
{
    UNUSED(sco);
    return FALSE;
}
#endif

/* **** PARTITION  */
#if TRAPSET_PARTITION 
Sink StreamPartitionOverwriteSink(partition_filesystem_devices device, uint16 partition)
{
    UNUSED(device);
    UNUSED(partition);
    return (Sink)NULL;
}


bool PartitionMountFilesystem(partition_filesystem_devices device, uint16 partition, partition_filesystem_priority priority)
{
    UNUSED(device);
    UNUSED(partition);
    UNUSED(priority);
    return FALSE;
}


bool PartitionGetInfo(partition_filesystem_devices device, uint16 partition, partition_info_key key, uint32 * value)
{
    UNUSED(device);
    UNUSED(partition);
    UNUSED(key);
    UNUSED(value);
    return FALSE;
}


bool PartitionSetMessageDigest(Sink sink, partition_message_digest_type md_type, uint16 * data, uint16 len)
{
    UNUSED(sink);
    UNUSED(md_type);
    UNUSED(data);
    UNUSED(len);
    return FALSE;
}


Source PartitionGetRawSerialSource(uint16 device, uint16 partition)
{
    UNUSED(device);
    UNUSED(partition);
    return (Source)NULL;
}


Sink StreamPartitionResumeSink(partition_filesystem_devices device, uint16 partition_no, uint16 first_word)
{
    UNUSED(device);
    UNUSED(partition_no);
    UNUSED(first_word);
    return (Sink)NULL;
}


uint32 PartitionSinkGetPosition(Sink sink)
{
    UNUSED(sink);
    return (uint32)0;
}
#endif

/* **** USB_HUB  */
/* FULLY IMPLEMENTED */

/* **** XIO  */
#if TRAPSET_XIO
trap_voltsense_result XioMeasureVoltage(Task task, xio_source first_xio, xio_source second_xio, vga_gain voltage_gain)
{
    UNUSED(task);
    UNUSED(first_xio);
    UNUSED(second_xio);
    UNUSED(voltage_gain);
    return (trap_voltsense_result)0;
}


bool DacEnable(bool enable)
{
    UNUSED(enable);
    return FALSE;
}


trap_voltsense_result DacSetGain(dac_buffer_gain gain)
{
    UNUSED(gain);
    return (trap_voltsense_result)0;
}


trap_voltsense_result DacSetLevel(uint16 level)
{
    UNUSED(level);
    return (trap_voltsense_result)0;
}
#endif

/* **** AMUXCLOCK  */
/* FULLY IMPLEMENTED */

/* **** OTP  */
/* FULLY IMPLEMENTED */

/* **** HOST  */
/* FULLY IMPLEMENTED */


/* **** ACL_CONTROL  */

/* **** OPERATOR  */
/* FULLY IMPLEMENTED */


/* **** AUDIO_PWM  */
#if TRAPSET_AUDIO_PWM
bool AudioPwmPowerEnable(bool enable)
{
    UNUSED(enable);
    return FALSE;
}


void AudioPwmMute(bool enable)
{
    UNUSED(enable);
}
#endif

/* **** AUDIO  */
/* FULLY IMPLEMENTED */



/* **** WAKE_ON_AUDIO  */
#ifdef TRAPSET_WAKE_ON_AUDIO
bool AudioDspGetClock(audio_dsp_clock * dsp_clock)
{
    UNUSED(dsp_clock);
    return FALSE;
}

audio_power_save_mode AudioPowerSaveModeGet(void )
{
    return (audio_power_save_mode)0;
}

bool OperatorFrameworkPreserve(uint16 n_ops, Operator * oplist, uint16 n_srcs, Source * srclist, uint16 n_sinks, Sink * sinklist)
{
    UNUSED(n_ops);
    UNUSED(oplist);
    UNUSED(n_srcs);
    UNUSED(srclist);
    UNUSED(n_sinks);
    UNUSED(sinklist);
    return FALSE;
}

bool OperatorFrameworkRelease(uint16 n_ops, Operator * oplist, uint16 n_srcs, Source * srclist, uint16 n_sinks, Sink * sinklist)
{
    UNUSED(n_ops);
    UNUSED(oplist);
    UNUSED(n_srcs);
    UNUSED(srclist);
    UNUSED(n_sinks);
    UNUSED(sinklist);
    return FALSE;
}

bool OperatorFrameworkTriggerNotificationStart(OperatorFrameworkTriggerType type, Operator opid)
{
    UNUSED(type);
    UNUSED(opid);
    return FALSE;
}

bool OperatorFrameworkTriggerNotificationStop(void )
{
    return FALSE;
}
#endif /*TRAPSET_WAKE_ON_AUDIO*/

/* **** PROFILE  */
/* FULLY IMPLEMENTED */

/* **** RA_PARTITION  */
/* FULLY IMPLEMENTED */

/* **** IIR16BIT  */
/* FULLY IMPLEMENTED */


/* **** LED  */
#if TRAPSET_LED
bool LedConfigure(led_id led, led_config_key key, uint16 value)
{
    UNUSED(led);
    UNUSED(key);
    UNUSED(value);
    return FALSE;
}




uint32 PioSetLcdPins(uint32 mask, uint32 pins, uint16 common_pin)
{
    UNUSED(mask);
    UNUSED(pins);
    UNUSED(common_pin);
    return (uint32)0;
}
#endif



/* **** BITSERIAL  */
#if TRAPSET_BITSERIAL
bitserial_handle BitserialOpen(bitserial_block_index block_index, const bitserial_config * config)
{
    UNUSED(block_index);
    UNUSED(config);
    return (bitserial_handle)0;
}


void BitserialClose(bitserial_handle handle)
{
    UNUSED(handle);
}


Task MessageBitserialTask(Task task)
{
    UNUSED(task);
    return (Task)NULL;
}


bitserial_result BitserialTransfer(bitserial_handle handle, bitserial_transfer_handle * transfer_handle_ptr, const uint8 * tx_data, uint16 tx_size, uint8 * rx_data, uint16 rx_size)
{
    UNUSED(handle);
    UNUSED(transfer_handle_ptr);
    UNUSED(tx_data);
    UNUSED(tx_size);
    UNUSED(rx_data);
    UNUSED(rx_size);
    return (bitserial_result)0;
}


bitserial_result BitserialWrite(bitserial_handle handle, bitserial_transfer_handle * transfer_handle_ptr, const uint8 * data, uint16 size, bitserial_transfer_flags flags)
{
    UNUSED(handle);
    UNUSED(transfer_handle_ptr);
    UNUSED(data);
    UNUSED(size);
    UNUSED(flags);
    return (bitserial_result)0;
}


bitserial_result BitserialRead(bitserial_handle handle, bitserial_transfer_handle * transfer_handle_ptr, uint8 * data, uint16 size, bitserial_transfer_flags flags)
{
    UNUSED(handle);
    UNUSED(transfer_handle_ptr);
    UNUSED(data);
    UNUSED(size);
    UNUSED(flags);
    return (bitserial_result)0;
}


bitserial_result BitserialChangeParam(bitserial_handle handle, bitserial_changeable_params key, uint16 value, bitserial_transfer_flags flags)
{
    UNUSED(handle);
    UNUSED(key);
    UNUSED(value);
    UNUSED(flags);
    return (bitserial_result)0;
}
#endif


/* **** MIRRORING  */
/* FULLY IMPLEMENTED */

/* **** BDADDR  */
/* FULLY IMPLEMENTED */

/* **** KALIMBA  */
#if TRAPSET_KALIMBA
Sink StreamKalimbaSink(uint16 port)
{
    UNUSED(port);
    return (Sink)NULL;
}


bool KalimbaLoad(FILE_INDEX file)
{
    UNUSED(file);
    return FALSE;
}


bool KalimbaPowerOff(void )
{
    return FALSE;
}


bool KalimbaSendMessage(uint16 message, uint16 a, uint16 b, uint16 c, uint16 d)
{
    UNUSED(message);
    UNUSED(a);
    UNUSED(b);
    UNUSED(c);
    UNUSED(d);
    return FALSE;
}


bool KalimbaSendLongMessage(uint16 message, uint16 len, const uint16 * data)
{
    UNUSED(message);
    UNUSED(len);
    UNUSED(data);
    return FALSE;
}


Task MessageKalimbaTask(Task task)
{
    UNUSED(task);
    return (Task)NULL;
}


uint32 PioGetKalimbaControl32(void )
{
    return (uint32)0;
}


uint32 PioSetKalimbaControl32(uint32 mask, uint32 value)
{
    UNUSED(mask);
    UNUSED(value);
    return (uint32)0;
}


Transform TransformRtpEncode(Source source, Sink sink)
{
    UNUSED(source);
    UNUSED(sink);
    return (Transform)NULL;
}


Transform TransformRtpDecode(Source source, Sink sink)
{
    UNUSED(source);
    UNUSED(sink);
    return (Transform)NULL;
}
#endif

/* **** CHARGERMESSAGE  */
/* FULLY IMPLEMENTED */


/* **** TEST  */
/* FULLY IMPLEMENTED */

/* **** PSU  */

#endif /* !__KALIMBA__ || HOSTED_TEST_ENVIRONMENT */

